package org.six11.ss.client;

import org.six11.ss.shared.Message;
import org.six11.util.adt.MultiState;

/**
 * 
 * 
 * @author Gabe Johnson <johnsogg@cmu.edu>
 */
public class ClueMessageHandler extends AWTMessageHandler {

  /**
   * @param state
   */
  public ClueMessageHandler(MultiState state) {
    super(state);
  }

  /**
   * 
   */
  @Override
  public void handleAWT(Message msg) {
    bug("Got a clue.\n" + msg.toXml());
    bug("msg.getParam('clear') evals to " + msg.getParam("clear"));
    if (msg.getParam("clear") != null) {
      state.setValue(ClientStateNames.K_CLUE, null);
    } else {
      state.setValue(ClientStateNames.K_CLUE, msg.getParam("clueText"));
    }
  }

}
